package academic.ui.client.widgets.forms;

import ui.client.GenericContainerTag;

import com.google.gwt.user.client.ui.CheckBox;

public class CheckoutForm extends AddEditCCForm {

	
	private CheckBox terms = new CheckBox();

	
	public CheckoutForm() {
		super();
	
		div.add(terms);
		div.add(new GenericContainerTag("span","I agree to the Terms of Use and Privacy Policy"));
	}
	
	@Override
	public Boolean checkRules() {
		super.checkRules();
		if(!terms.getValue())
		{
			terms.addStyleName("missingValue");
			errorMsgs.add(new GenericContainerTag("div","You must agree to the Terms"));
		}
		return errorMsgs.getWidgetCount()<1;
	}
	
	

	
}
